iscsi session cleanup now configurable, filters iscsi partitions#4219
iscsi session cleanup now configurable, filters iscsi partitions#4219yadvr merged 7 commits intoapache:4.13from
Conversation
There was a problem hiding this comment.
Thanks for the PR, @skattoju4. I have added a few observations.
I do not have any test environment with iSCSI; therefore, I will not be able to test this one. My contributions will be only regarding code enhancements.
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
| //check the volume map. If an entry exists change the status to True | ||
| for (final LibvirtVMDef.DiskDef disk : disks) { | ||
| if (diskStatusMap.containsKey(disk.getDiskPath())) { | ||
| if (diskStatusMap.containsKey(disk.getDiskPath())&&!disk.getDiskPath().contains("part")) { |
There was a problem hiding this comment.
Can you please extract "part" to a constant?
Adding some details/documentation on why it is important to have this constant checked might be a plus as well.
There was a problem hiding this comment.
@svenvogel @skattoju4 The commit from PR #3819 was added on 4.13, right? This PR should then be also aimed at branch 4.13.
would you know whats the best way to rebase it to 4.13 is ?
|
@svenvogel @skattoju4 The commit from PR #3819 was added on 4.13, right? This PR should then be also aimed at branch 4.13. |
| final Thread cleanupMonitor = new Thread(isciCleanupMonitor); | ||
| cleanupMonitor.start(); | ||
| } else { | ||
| s_logger.info("iscsi session clean up is disabled") |
There was a problem hiding this comment.
I believe you have forgotten the ';' on here.
|
@GabrielBrascher yes sure its in 4.13.1 and 4.14 and can be rebased. how is it with a forward merge after merge? |
| private static final String ISCSI_PATH_PREFIX = "/dev/disk/by-path"; | ||
| private static final String KEYWORD_ISCSI = "iscsi"; | ||
| private static final String KEYWORD_IQN = "iqn"; | ||
| private static final String KEYWORD_PART = "part"; |
There was a problem hiding this comment.
Is this constant used anywhere?
| private static final String KEYWORD_ISCSI = "iscsi"; | ||
| private static final String KEYWORD_IQN = "iqn"; | ||
| private static final String KEYWORD_PART = "part"; | ||
| private static final String REGEX_PART = "\\S+part\\d+$"; |
There was a problem hiding this comment.
Perhaps we want to use KEYWORD_PART here instead of "part"?
mike-tutkowski
left a comment
There was a problem hiding this comment.
I have not personally tested this code, but it LGTM.
|
@skattoju4 yes we will test this and come back as fast as we can. 👍 |
|
I manually tested the code over the weekend and it seems to work as expected. My test deployment uses unmanaged ISCSI connections underlying a CLVM Volume Group for its Primary Storage. Here are the three test cases and results.
Looks good to me. |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the updates, @skattoju4.
LGTM based on code review.
|
@svenvogel @skattoju4 regarding the question of which branch this one should be targeted: |
|
@GabrielBrascher yes, I agree. |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@skattoju4 can you cherry-pick or rebase your PR branch against 4.13? |
|
@skattoju4 it's not just changing the base branch - see the diff - you need to rebase changes against 4.13 (base branch) |
7697ad6 to
7f34c9e
Compare
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1792 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2520)
|
Description
Added property to agent.properties that enables or disables the iscsi session clean up feature. #4210
Added a condition to prevent disk partitions from being cleaned up. #4216
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?